package com.tongji.quickCRUDQ.dao.id;

import java.util.List;
import java.util.Map;

import com.tongji.quickCRUDQ.dao.jdbc.CommonDao;

public class IdGeneratorSqlserver implements IdGenerator {
	private CommonDao commonDao;

	public String generator(Object obj) {
		String sql="select dbo.get_seq() as  ID ";
		List list=commonDao.select(sql);
		Map map=(Map)list.get(0);
		String id=(String) map.get("ID");
		return id;	}

	public CommonDao getCommonDao() {
		return commonDao;
	}

	public void setCommonDao(CommonDao commonDao) {
		this.commonDao = commonDao;
	}

}
